﻿[[title="用户货位授权树",pagesize="",orderby="",condition=""]]
<script type="text/javascript" language="javascript">
    window.onload = function () {
        wmsCommon.setTreeContentStyle();
    }
    function wmsTreeOnClick(e, treeId, treeNode) {
        var wbscode = treeNode.wbs; //wbscode
        var id = treeNode.key;    //id
        var href = "";
        var useNo = wmsCommon.getEncodeQueryStr('userNo');
        href = "../model.aspx?model=roleInfo&temp=userRoleAuthorizationList&"+encodeURI("con=departWBS like'" + wbscode + "%'&userNo=" + useNo);
        $('#role_list', parent.document.body).attr('src', href);
    }

    function changeWindowSize() {
        wmsCommon.setTreeDivStyle("treeDiv", 1, 30);
    }

    $(function () {
        wmsCommon.setTreeDivStyle("treeDiv", 1, 30);
    });
</script>
<div id="treeDiv" style="text-align: center; ">
$dataContext.CreateControl("displayType=tree;data=wmsql(select wbscode as [key],departName as [name],departName as [text],wbsCode from departments);")
</div>